feat(Layout): add style support ShowTabInHeader parameter#5773
Merged
feat(Layout): add style support ShowTabInHeader parameter#5773
Conversation
Contributor
Reviewer's Guide by SourceryThis pull request updates the project version, enhances layout styles to support tabs in the header, and refines tab component behavior and styles. The primary changes involve updating the project version, modifying layout-related SCSS files, and adjusting the Tab component's Razor and C# files. Sequence diagram for Tab registration with LayoutsequenceDiagram
participant Tab
participant Layout
Tab->>Tab: OnParametersSet()
alt Layout.ShowTabInHeader is true
Tab->>Layout: RegisterTab(this)
else Layout.ShowTabInHeader is false
Tab->>Tab: TabHeader = null
end
Updated class diagram for the Tab componentclassDiagram
class Tab {
+Layout Layout
+bool ShowActiveBar
+TabStyle TabStyle
+void OnInitialized()
+void OnParametersSet()
}
note for Tab.OnInitialized "Layout.RegisterTab call removed from OnInitialized"
note for Tab.OnParametersSet "Layout.RegisterTab call moved to OnParametersSet"
Updated class diagram for the Layout componentclassDiagram
class Layout {
+void RegisterTab(Tab tab)
+bool ShowTabInHeader
}
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- Moving
Layout.RegisterTabtoOnParametersSetlooks correct, but consider what happens whenShowTabInHeaderchanges after the component is initialized. - Be careful when setting height to 100% in CSS, as it can have unexpected results if the parent element doesn't have a defined height.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5773 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 658 658
Lines 30029 30032 +3
Branches 4243 4243
=========================================
+ Hits 30029 30032 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link issues
fixes #5772
Summary By Copilot
This pull request includes updates to the
BootstrapBlazorproject, focusing on version updates, layout enhancements, and tab component improvements. The most important changes include updating the project version, enhancing the layout styles, and refining the tab component behavior and styles.Version Update:
src/BootstrapBlazor/BootstrapBlazor.csproj: Updated project version from 9.5.1 to 9.5.2.Layout Enhancements:
src/BootstrapBlazor/Components/Layout/Layout.razor.scss: Added new styles for.tabswithin.layout-mainand.tabs.tabs-chrometo improve layout and appearance. [1] [2] [3]Tab Component Improvements:
src/BootstrapBlazor/Components/Tab/Tab.razor: Modified the condition to display the active bar only whenTabStyleisDefault.src/BootstrapBlazor/Components/Tab/Tab.razor.cs: Moved theLayout.RegisterTabcall fromOnInitializedtoOnParametersSetto ensure proper initialization based on parameters. [1] [2]src/BootstrapBlazor/Components/Tab/Tab.razor.scss: Changed the CSS variable for tab header height from--bb-tabs-header-heightto--bb-tabs-chrome-item-heightfor consistency and updated related styles. [1] [2]Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enhance layout and tab component styling with improved support for ShowTabInHeader parameter and chrome-style tabs
New Features:
Bug Fixes:
Enhancements: